﻿using PARK.Common.Const;
using PARK.Common.Entity;
using SqlSugar;

namespace PARK.System.Entitys.Permission
{
    /// <summary>
    /// 角色信息基类
    /// </summary>
    [SugarTable("BASE_ROLE")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class RoleEntity : CLDEntityBase
    {
        /// <summary>
        /// 获取或设置 角色名称
        /// </summary>
        [SugarColumn(ColumnName = "F_FULLNAME", ColumnDescription = "角色名称")]
        public string FullName { get; set; }

        /// <summary>
        /// 获取或设置 角色编号
        /// </summary>
        [SugarColumn(ColumnName = "F_ENCODE", ColumnDescription = "角色编号")]
        public string EnCode { get; set; }

        /// <summary>
        /// 获取或设置 角色类型
        /// </summary>
        [SugarColumn(ColumnName = "F_TYPE", ColumnDescription = "角色类型")]
        public string Type { get; set; }

        /// <summary>
        /// 获取或设置 扩展属性
        /// </summary>
        [SugarColumn(ColumnName = "F_PROPERTYJSON", ColumnDescription = "扩展属性")]
        public string PropertyJson { get; set; }

        /// <summary>
        /// 获取或设置 描述
        /// </summary>
        [SugarColumn(ColumnName = "F_DESCRIPTION", ColumnDescription = "描述")]
        public string Description { get; set; }

        /// <summary>
        /// 获取或设置 描述
        /// </summary>
        [SugarColumn(ColumnName = "F_SORTCODE", ColumnDescription = "排序")]
        public long? SortCode { get; set; }

        /// <summary>
        /// 是否平台角色 1是0否
        /// </summary>
        [SugarColumn(ColumnName = "F_IsSys")]
        public int IsSys { get; set; }
        /// <summary>
        /// 是否平台默认角色 1是0否
        /// </summary>
        [SugarColumn(ColumnName = "F_IsDefault")]
        public int IsDefault { get; set; }

        /// <summary>
        /// 角色身份 1 租户下自建角色 2平台分配角色 3平台角色
        /// </summary>
        [SugarColumn(ColumnName = "F_Roletype")]
        public int Roletype { get; set; }

        /// <summary>
        /// 所属公司Id
        /// </summary>
        [SugarColumn(ColumnName = "CompanyId")]
        public string CompanyId { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        [SugarColumn(ColumnName = "CompanyName")]
        public string CompanyName { get; set; }

        /// <summary>
        /// 是否超管 1是 0否
        /// </summary>
        [SugarColumn(ColumnName = "F_IsAdmin")]
        public int IsAdmin { get; set; }

        /// <summary>
        /// 是否为平台创建 1是 0否
        /// </summary>
        [SugarColumn(ColumnName = "F_IsSysCreate")]
        public int IsSysCreate { get; set; }
    }
}
